<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>原型链</title>
	</head>

	<body>
		<script>
			function Humans() {
				this.foot = 2;
			}
			Humans.prototype.getFoot = function() {
				return this.foot;
			}

			function Man() {
				this.head = 1;
			}

			Man.prototype = new Humans(); //继承
			Man.prototype.getHead = function() {
				return this.head;
			}

			var man1 = new Man();
			alert(man1.getFoot());
			alert(man1.getHead());

			alert(man1 instanceof Object);
			alert(man1 instanceof Humans);
			alert(man1 instanceof Man);
		</script>
	</body>

</html>